Speeding Up Dijkstra ’ s Algorithm for All Pairs Shortest Paths ∗
نویسنده
چکیده
We present a technique for reducing the number of edge scans performed by Dijkstra’s algorithm for computing all pairs shortest paths. The main idea is to restrict path scanning only to locally shortest paths, i.e., paths whose proper subpaths are shortest paths. On a directed graph with n vertices and m edges, the technique we discuss allows it to reduce the number of edge scans from O(mn) to O(lsp), where lsp ≤ mn is the number of locally shortest paths in the graph. Using Fibonacci heaps, this method can be implemented in O(lsp+n2 log n) worst-case time in a graph with non-negative real edge weights. Experimental evidence suggests that lsp << mn for many classes of graphs that arise in practical applications, resulting in substantial speedups especially in the case of dense graphs.
منابع مشابه
Recursive Cut and Stitch: Fast All-Pairs Shortest Paths Computation for Subset of Nodes
We present a practical algorithm for computing all pairs shortest paths for subset of nodes on road networks. It provides an important improvement for applications such as traffic analysis, where recomputation of shortest paths is the most expensive step that has to be repeated many times. We propose an algorithm that recursively cuts the graph until pieces are small enough to compute shortest ...
متن کاملCMSC 451 : Lecture 13 All - Pairs Shortest Paths and the Floyd - Warshall Algorithm
All-Pairs Shortest Paths: Earlier, we saw that Dijkstra’s algorithm and the Bellman-Ford algorithm both solved the problem of computing shortest paths in graphs from a single source vertex. Suppose that we want instead to compute shortest paths between all pairs of vertices. We could do this applying either Dijkstra or Bellman-Ford using every vertex as a source, but today we will consider an a...
متن کاملCMSC 451 Dave Mount CMSC 451 : Lecture 13 All - Pairs Shortest Paths and the Floyd - Warshall Algorithm Tuesday
All-Pairs Shortest Paths: Earlier, we saw that Dijkstra’s algorithm and the Bellman-Ford algorithm both solved the problem of computing shortest paths in graphs from a single source vertex. Suppose that we want instead to compute shortest paths between all pairs of vertices. We could do this applying either Dijkstra or Bellman-Ford using every vertex as a source, but today we will consider an a...
متن کاملFinding the Hidden Path: Time Bounds for All-Pairs Shortest Paths
We investigate the all-pairs shortest paths problem in weighted graphs. We present an algorithm|the Hidden Paths Algorithm|that nds these paths in time O(m n+n 2 log n), where m is the number of edges participating in shortest paths. Our algorithm is a practical substitute for Dijkstra's algorithm. We argue that m is likely to be small in practice, since m = O(n logn) with high probability for ...
متن کاملUsing a Divide and Conquer Method for Routing in a PC Vehicle Routing Application
Vehicle routing is an area of both practical and theoretical importance. Unfortunately, routing problems are notably difficult to solve since almost all vehicle routing problems are NP-hard. However, we have discovered that when reduced to its simplest form, solving a single vehicle routing problem, without capacity and time window constraints is quite similar to the Traveling Salesman Problem ...
متن کامل